package ee.tlnk.model;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * The Class RoomModel.
 */
@Entity
@Table(name="rooms")
public class RoomModel implements Serializable {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1L;
	
	/** The id. */
	@Id
	@Column(name = "id")
	@GeneratedValue
	private Integer id;

	/** The name. */
	@Column(name = "name")
	private String name;

	/** The volume. */
	@Column(name = "volume")
	private double volume;
	
	/** The occupancy. */
	@Column(name = "occupansy")
	private short occupancy;
	
    /** The orders. */
    @OneToMany(mappedBy="room")
    private Set<OrderModel> orders;

    
	/**
	 * Gets the orders.
	 *
	 * @return the orders
	 */
	public Set<OrderModel> getOrders() {
		return orders;
	}
	
	/**
	 * Sets the orders.
	 *
	 * @param orders the orders to set
	 */
	public void setOrders(Set<OrderModel> orders) {
		this.orders = orders;
	}
	
	/**
	 * Gets the occupancy.
	 *
	 * @return the occupancy
	 */
	public short getOccupancy() {
		return occupancy;
	}
	
	/**
	 * Sets the occupancy.
	 *
	 * @param occupancy the new occupancy
	 */
	public void setOccupancy(short occupancy) {
		this.occupancy = occupancy;
	}
	
	/**
	 * Gets the id.
	 *
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}
	
	/**
	 * Sets the id.
	 *
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	
	/**
	 * Gets the name.
	 *
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * Sets the name.
	 *
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * Gets the volume.
	 *
	 * @return the volume
	 */
	public double getVolume() {
		return volume;
	}
	
	/**
	 * Sets the volume.
	 *
	 * @param volume the volume to set
	 */
	public void setVolume(double volume) {
		this.volume = volume;
	}
	
}
